/// unreadCount : 10
/// rows : [{"title":"","subTitle":"","appRouteUrl":"","date":"10分钟前","hasRead":1},{"title":"","subTitle":"","appRouteUrl":"","date":"10分钟前","hasRead":1}]

class DataBean {
  int unreadCount;
  List<MessageList> rows;
  int totalPage;
  DataBean({this.unreadCount, this.rows,this.totalPage});

  DataBean.fromJson(Map<String, dynamic> json) {
    unreadCount = json['unreadCount'];
    totalPage = json["totalPage"];
    if (json['rows'] != null) {
      rows = new List<MessageList>();
      json['rows'].forEach((v) {
        rows.add(new MessageList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['unreadCount'] = this.unreadCount;
    if (this.rows != null) {
      data['rows'] = this.rows.map((v) => v.toJson()).toList();
    }
    data["totalPage"] = this.totalPage;
    return data;
  }
}

class MessageList {
  String title;
  String subTitle;
  String appRouteUrl;
  String date;
  int hasRead;
  int id;

  MessageList(
      {this.title, this.subTitle, this.appRouteUrl, this.date, this.hasRead});

  MessageList.fromJson(Map<String, dynamic> json) {
    title = json['title'] ?? "";
    subTitle = json['subTitle'] ?? "";
    appRouteUrl = json['appRouteUrl'] ?? "";
    date = json['date'] ?? "";
    hasRead = json['hasRead'] ?? 1;
    id = json["id"] ?? 0;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['subTitle'] = this.subTitle;
    data['appRouteUrl'] = this.appRouteUrl;
    data['date'] = this.date;
    data['hasRead'] = this.hasRead;
    data["id"] = this.id;
    return data;
  }
}

class ParamBean {
  String title;
  dynamic type;

  ParamBean({this.title = "", this.type});

  ParamBean.fromJson(Map<String, dynamic> json) {
    title = json['title'] ?? "";
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['type'] = this.type;
    return data;
  }
}